package service.ImpI;

import bean.Fruit;
import dao.impI.FruitDaoImpI;
import service.FruitService;

import java.util.List;

public class FruitServiceImpI implements FruitService {
    FruitDaoImpI fruitDaoImpI=new FruitDaoImpI();

    @Override
    public boolean addFruit(Fruit fruit) {
        return fruitDaoImpI.addFruit(fruit);
    }

    @Override
    public List<Fruit> findAllFruit() {
        return fruitDaoImpI.findAllFruit();
    }

    @Override
    public Fruit findProductById(int id) {
        return fruitDaoImpI.findProductById(id);
    }

    @Override
    public boolean deleteProductById(int id) {
        return fruitDaoImpI.deleteProductById(id);
    }

    @Override
    public boolean updateProduct(Fruit fruit) {
        return fruitDaoImpI.updateProduct(fruit);
    }
}
